package fileInput;

import java.io.FileInputStream;
import java.io.IOException;

public class FileInputStreamDemo {
    public static void main(String[] args) throws IOException {
        //IO输入流
        //1.创建输入流文件
        FileInputStream fis = new FileInputStream("IODemo\\hello.txt");
        //2.读取数据
        int r1 = fis.read();
        int r2 = fis.read();
        int r3 = fis.read();
        int r4 = fis.read();
        //3.打印数据
        System.out.println((char)r1);
        System.out.println((char)r2);
        System.out.println((char)r3);
        System.out.println((char)r4);
        //4.释放资源
        fis.close();

    }
}
